home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
pipe.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-19
|
1KB
|
53 lines
/*
* pipe.c --
*
* Procedure to map from Unix pipe system call to Sprite.
*
* Copyright 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: pipe.c,v 1.1 88/06/19 14:31:40 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include "sprite.h"
#include "fs.h"
#include "compatInt.h"
#include <errno.h>
/*
*----------------------------------------------------------------------
*
* pipe --
*
* Procedure to map from Unix pipe system call to Sprite Fs_CreatePipe
* system call.
*
* Results:
* Error returned if error returned from Fs_CreatePipe. Otherwise
* UNIX_SUCCESS.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
pipe(filedes)
int filedes[2]; /* array of stream identifiers */
{
ReturnStatus status; /* result returned by Fs_CreatePipe */
status = Fs_CreatePipe(&(filedes[0]), &(filedes[1]));
if (status != SUCCESS) {
errno = Compat_MapCode(status);
return(UNIX_ERROR);
} else {
return(UNIX_SUCCESS);
}
}